|
|
|
|
|
|
|
Figure 1.17
Example program Resize calculates and draws only when necessary. |
|
|
|
|
|
|
|
|
Visual Basic allows you to create a wide variety of controls quickly and easily. Controls range in complexity from the Line control, which simply displays a line on a form, to the RichTextBox control, which has all the power of a full-featured text editor. |
|
|
|
|
|
|
|
|
Many of these controls are designed to display data, such as text, that is not drawing oriented. Even so, this is basically graphic in nature. For example, it is easy to think of a Label control as a container for text. However, a Label control occupies space on the screen, can obscure other label controls placed behind it, and has many graphic properties, including font type, font size, and foreground color. While Label controls are most often used to display text in a fairly boring fashion, they provide a rich assortment of graphic features. |
|
|
|
|
|
|
|
|
Example program Font, shown in Figure 1.18, contains a label using a font named Bremen with a three-dimensional border and a white background. The sections that follow explain how you can use graphic properties to determine the appearance of controls on the screen. |
|
|
|
|
|
|
|
|
Figure 1.18
Example program Font demonstrates some of a
label's many graphic properties. |
|
|
|
|
|